<?php

namespace WinZ\DataMinerBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class AccountType extends AbstractType
{
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $builder
            ->add('name')
            ->add('machine')
            ->setRequired(false)
            ->add('mail')
            ->add('password')
            ->setRequired(false);
            /*    
            ->add('characters', 'entity', array(
                        'class' => 'DataMinerBundle:Character',
                        'property' => 'name',
                         )
                     );
             */
             
    }

    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'WinZ\DataMinerBundle\Entity\Account'
        ));
    }

    public function getName()
    {
        return 'winz_dataminerbundle_accounttype';
    }
}
